<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>QuantumLibrary: Bloomberg::quantum::IPromiseBase Interface Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../navtreedata.js"></script>
<script type="text/javascript" src="../../navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(initResizable);
/* @license-end */</script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">QuantumLibrary
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('../../',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('df/de4/structBloomberg_1_1quantum_1_1IPromiseBase.html','../../');});
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="../../db/dfe/structBloomberg_1_1quantum_1_1IPromiseBase-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">Bloomberg::quantum::IPromiseBase Interface Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div>  </div>
</div><!--header-->
<div class="contents">

<p>Exposes methods to manipulate and access a promise.  
 <a href="../../df/de4/structBloomberg_1_1quantum_1_1IPromiseBase.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="../../df/dd2/quantum__ipromise__base_8h_source.html">quantum_ipromise_base.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for Bloomberg::quantum::IPromiseBase:</div>
<div class="dyncontent">
 <div class="center">
  <img src="../../df/de4/structBloomberg_1_1quantum_1_1IPromiseBase.png" usemap="#Bloomberg::quantum::IPromiseBase_map" alt=""/>
  <map id="Bloomberg::quantum::IPromiseBase_map" name="Bloomberg::quantum::IPromiseBase_map">
<area href="../../d9/ddb/structBloomberg_1_1quantum_1_1ITerminate.html" title="Represents an object which can be terminated. This interface allows certain objects to be explicitly ..." alt="Bloomberg::quantum::ITerminate" shape="rect" coords="0,0,206,24"/>
<area href="../../d1/d15/classBloomberg_1_1quantum_1_1Promise.html" title="Class representing a promised value." alt="Bloomberg::quantum::Promise&lt; T &gt;" shape="rect" coords="0,112,206,136"/>
  </map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a50506be87412ef38d4bd954ff6285b3e"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/de4/structBloomberg_1_1quantum_1_1IPromiseBase.html#a50506be87412ef38d4bd954ff6285b3e">Ptr</a> = std::shared_ptr&lt; <a class="el" href="../../df/de4/structBloomberg_1_1quantum_1_1IPromiseBase.html">IPromiseBase</a> &gt;</td></tr>
<tr class="separator:a50506be87412ef38d4bd954ff6285b3e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ae888884dbe9f6c8211d4a4c3c6d59ab1"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/de4/structBloomberg_1_1quantum_1_1IPromiseBase.html#ae888884dbe9f6c8211d4a4c3c6d59ab1">valid</a> () const =0</td></tr>
<tr class="memdesc:ae888884dbe9f6c8211d4a4c3c6d59ab1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Determines if this promise still has a shared state with the corresponding future object.  <a href="#ae888884dbe9f6c8211d4a4c3c6d59ab1">More...</a><br /></td></tr>
<tr class="separator:ae888884dbe9f6c8211d4a4c3c6d59ab1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0b80762c0abda93e8bca6af34e8c295e"><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/de4/structBloomberg_1_1quantum_1_1IPromiseBase.html#a0b80762c0abda93e8bca6af34e8c295e">setException</a> (std::exception_ptr ex)=0</td></tr>
<tr class="memdesc:a0b80762c0abda93e8bca6af34e8c295e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set an exception in this promise.  <a href="#a0b80762c0abda93e8bca6af34e8c295e">More...</a><br /></td></tr>
<tr class="separator:a0b80762c0abda93e8bca6af34e8c295e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a76b3b5d5b01fca63778ff3fd32a93608"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="../../d1/d2d/structBloomberg_1_1quantum_1_1IThreadFutureBase.html#a7a5e5adf9e104bef3f570aace79ecf5c">IThreadFutureBase::Ptr</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/de4/structBloomberg_1_1quantum_1_1IPromiseBase.html#a76b3b5d5b01fca63778ff3fd32a93608">getIThreadFutureBase</a> () const =0</td></tr>
<tr class="memdesc:a76b3b5d5b01fca63778ff3fd32a93608"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a thread-compatible interface used to access the associated future.  <a href="#a76b3b5d5b01fca63778ff3fd32a93608">More...</a><br /></td></tr>
<tr class="separator:a76b3b5d5b01fca63778ff3fd32a93608"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3aeb93c1441cfa2d7ac633a12f04782b"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="../../dc/d82/structBloomberg_1_1quantum_1_1ICoroFutureBase.html#a8fdb9918c64ffca16815929757df77fe">ICoroFutureBase::Ptr</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/de4/structBloomberg_1_1quantum_1_1IPromiseBase.html#a3aeb93c1441cfa2d7ac633a12f04782b">getICoroFutureBase</a> () const =0</td></tr>
<tr class="memdesc:a3aeb93c1441cfa2d7ac633a12f04782b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a coroutine-compatible interface used to access the associated future.  <a href="#a3aeb93c1441cfa2d7ac633a12f04782b">More...</a><br /></td></tr>
<tr class="separator:a3aeb93c1441cfa2d7ac633a12f04782b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_structBloomberg_1_1quantum_1_1ITerminate"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_structBloomberg_1_1quantum_1_1ITerminate')"><img src="../../closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="../../d9/ddb/structBloomberg_1_1quantum_1_1ITerminate.html">Bloomberg::quantum::ITerminate</a></td></tr>
<tr class="memitem:a4086a8ce16fc2482ee77701d387b14d8 inherit pub_methods_structBloomberg_1_1quantum_1_1ITerminate"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/ddb/structBloomberg_1_1quantum_1_1ITerminate.html#a4086a8ce16fc2482ee77701d387b14d8">~ITerminate</a> ()=default</td></tr>
<tr class="memdesc:a4086a8ce16fc2482ee77701d387b14d8 inherit pub_methods_structBloomberg_1_1quantum_1_1ITerminate"><td class="mdescLeft">&#160;</td><td class="mdescRight">Virtual destructor. This function is explicitly left empty.  <a href="../../d9/ddb/structBloomberg_1_1quantum_1_1ITerminate.html#a4086a8ce16fc2482ee77701d387b14d8">More...</a><br /></td></tr>
<tr class="separator:a4086a8ce16fc2482ee77701d387b14d8 inherit pub_methods_structBloomberg_1_1quantum_1_1ITerminate"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a66e42ce854b5afbb7742c5ffdaae8503 inherit pub_methods_structBloomberg_1_1quantum_1_1ITerminate"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/ddb/structBloomberg_1_1quantum_1_1ITerminate.html#a66e42ce854b5afbb7742c5ffdaae8503">terminate</a> ()=0</td></tr>
<tr class="memdesc:a66e42ce854b5afbb7742c5ffdaae8503 inherit pub_methods_structBloomberg_1_1quantum_1_1ITerminate"><td class="mdescLeft">&#160;</td><td class="mdescRight">Terminates the object.  <a href="../../d9/ddb/structBloomberg_1_1quantum_1_1ITerminate.html#a66e42ce854b5afbb7742c5ffdaae8503">More...</a><br /></td></tr>
<tr class="separator:a66e42ce854b5afbb7742c5ffdaae8503 inherit pub_methods_structBloomberg_1_1quantum_1_1ITerminate"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Exposes methods to manipulate and access a promise. </p>
</div><h2 class="groupheader">Member Typedef Documentation</h2>
<a id="a50506be87412ef38d4bd954ff6285b3e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a50506be87412ef38d4bd954ff6285b3e">&#9670;&nbsp;</a></span>Ptr</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">using <a class="el" href="../../df/de4/structBloomberg_1_1quantum_1_1IPromiseBase.html#a50506be87412ef38d4bd954ff6285b3e">Bloomberg::quantum::IPromiseBase::Ptr</a> =  std::shared_ptr&lt;<a class="el" href="../../df/de4/structBloomberg_1_1quantum_1_1IPromiseBase.html">IPromiseBase</a>&gt;</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a3aeb93c1441cfa2d7ac633a12f04782b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3aeb93c1441cfa2d7ac633a12f04782b">&#9670;&nbsp;</a></span>getICoroFutureBase()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="../../dc/d82/structBloomberg_1_1quantum_1_1ICoroFutureBase.html#a8fdb9918c64ffca16815929757df77fe">ICoroFutureBase::Ptr</a> Bloomberg::quantum::IPromiseBase::getICoroFutureBase </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get a coroutine-compatible interface used to access the associated future. </p>
<dl class="section return"><dt>Returns</dt><dd>An interface to the associated future. </dd></dl>

<p>Implemented in <a class="el" href="../../d1/d15/classBloomberg_1_1quantum_1_1Promise.html#a2c1896254390315ca496de30469bd9ba">Bloomberg::quantum::Promise&lt; T &gt;</a>.</p>

</div>
</div>
<a id="a76b3b5d5b01fca63778ff3fd32a93608"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a76b3b5d5b01fca63778ff3fd32a93608">&#9670;&nbsp;</a></span>getIThreadFutureBase()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="../../d1/d2d/structBloomberg_1_1quantum_1_1IThreadFutureBase.html#a7a5e5adf9e104bef3f570aace79ecf5c">IThreadFutureBase::Ptr</a> Bloomberg::quantum::IPromiseBase::getIThreadFutureBase </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get a thread-compatible interface used to access the associated future. </p>
<dl class="section return"><dt>Returns</dt><dd>An interface to the associated future. </dd></dl>

<p>Implemented in <a class="el" href="../../d1/d15/classBloomberg_1_1quantum_1_1Promise.html#acb11ada5731c0bd66740a00afb2b2ffc">Bloomberg::quantum::Promise&lt; T &gt;</a>.</p>

</div>
</div>
<a id="a0b80762c0abda93e8bca6af34e8c295e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0b80762c0abda93e8bca6af34e8c295e">&#9670;&nbsp;</a></span>setException()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual int Bloomberg::quantum::IPromiseBase::setException </td>
          <td>(</td>
          <td class="paramtype">std::exception_ptr&#160;</td>
          <td class="paramname"><em>ex</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set an exception in this promise. </p>
<p>When setting an exception inside a promise, any attempt to read a value from the associated future will re-throw this exception. Any threads or coroutines already blocked on this future will immediately unblock and re-throw. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">ex</td><td>An exception pointer which has been caught via std::current_exception. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 on success </dd></dl>

<p>Implemented in <a class="el" href="../../d1/d15/classBloomberg_1_1quantum_1_1Promise.html#ab2b2b69d137c361491bb2d16f4b19246">Bloomberg::quantum::Promise&lt; T &gt;</a>.</p>

</div>
</div>
<a id="ae888884dbe9f6c8211d4a4c3c6d59ab1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae888884dbe9f6c8211d4a4c3c6d59ab1">&#9670;&nbsp;</a></span>valid()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool Bloomberg::quantum::IPromiseBase::valid </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Determines if this promise still has a shared state with the corresponding future object. </p>
<dl class="section return"><dt>Returns</dt><dd>True if valid, false otherwise. </dd></dl>

<p>Implemented in <a class="el" href="../../d1/d15/classBloomberg_1_1quantum_1_1Promise.html#ac18d1bd78251444f071dae7b658c4eaf">Bloomberg::quantum::Promise&lt; T &gt;</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="../../d6/db9/namespaceBloomberg.html">Bloomberg</a></li><li class="navelem"><a class="el" href="../../dc/d48/namespaceBloomberg_1_1quantum.html">quantum</a></li><li class="navelem"><a class="el" href="../../df/de4/structBloomberg_1_1quantum_1_1IPromiseBase.html">IPromiseBase</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.15 </li>
  </ul>
</div>
</body>
</html>
